#ifndef IR_RC6_H
#define IR_RC6_H

#include "stm8s.h"

#define RC6_MODE_BITS           3 // never seen others than all 0 for Philips TV
#define RC6_TOGGLE_BIT          1 // toggles at every key press. Can be used to distinguish repeats from 2 key presses and has another timing :-(.
#define RC6_TOGGLE_BIT_INDEX    RC6_MODE_BITS //  fourth position, index = 3

#define RC6_HEADER_MARK 	6
#define RC6_HEADER_SPACE    2
#define RC6_UNIT            1

void HighPulse();
void LowPulse();
void mark(uint8_t n_mark);
void space(uint8_t n_space);
void sendRC6Raw(uint32_t aRawData, uint8_t aNumberOfBitsToSend);


#endif	/*IR_RC6_H*/